<?php
/**
 * Created by PhpStorm.
 * User: helloworld
 * Date: 2016/12/12
 * Time: 18:14
 */
defined('IN_IA') or exit('Access Denied');
load()->func('tpl');

if(checksubmit()){
    //
    $data = array(
      'title' =>$_GPC["title"],
      'description'=>$_GPC["description"],
        'content'=>$_GPC["content"]
    );
    if(!empty($_GPC["aid"])&&pdo_update('site_article',$data,array('id'=>$_GPC['aid']))){
        message("更新成功",url("manage/weizhan"));
    }else{
        message("更新失败",'refresh');
    }
    $aid = $_GPC['aid'];
}

$article = pdo_fetch('select * from '.tablename('site_article').'where id='.$_GPC['aid']);

template("manage/article");
